package cn.wolfcode.wolf2w.controller;

import cn.wolfcode.wolf2w.domain.SpotsDetails;
import cn.wolfcode.wolf2w.service.ISpotsDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.lang.model.element.VariableElement;
import java.util.List;

@RestController
@RequestMapping("/spotsDetails")
public class SpotsDetailsController {

    @Autowired
    private ISpotsDetailsService spotsDetailsService;

    @GetMapping("/list")
    public Object list(String id){
        SpotsDetails spotsDetails = spotsDetailsService.queryByDetails(id);
        System.out.println(spotsDetails);
        return spotsDetails;
    }
}
